package com.beamfield.dao.lab;

import com.beamfield.model.LabChemical;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;
@Component
public interface LabChemicalMapper {
    int deleteByPrimaryKey(Long id);

    int insert(LabChemical record);

    int insertSelective(LabChemical record);

    LabChemical selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(LabChemical record);

    int updateByPrimaryKey(LabChemical record);

    List<LabChemical> getChemicalList(@Param("offset")Integer offset, @Param("limit")Integer limit, @Param("storage_location")String storage_location, @Param("chemical_name")String chemical_name, @Param("beam_id")Long beam_id);

    int getCount(@Param("storage_location")String storage_location, @Param("chemical_name")String chemical_name, @Param("beam_id")Long beam_id);

    List<String> getAllChemicalName(@Param("beam_id")Long beam_id);

    double getSumByChemicalName(@Param("chemical_name")String chemical_name, @Param("beam_id")Long beam_id);

    LabChemical selectByChemicalName(@Param("chemical_name")String chemical_name, @Param("beam_id")Long beam_id);
}